import request from '@/utils/request'

export function assetsPut(data) {
    return request({
        url: '/assets/software',
        method: 'put',
        data
    }).then(res => {
        return res
    })
}

export function assetsPage(data) {
    return request({
        url: '/assets/software/page',
        method: 'post',
        data
    }).then(res => {
        return res
    })
}

export function assetsImport(data) {
    return request({
        url: 'soft/import2',
        method: 'post',
        data
    }).then(res => {
        return res
    })
}

export function assetsExport(data) {
    return request({
        url: '/soft/export',
        method: 'post',
        data
    }).then(res => {
        return res
    })
}

export function assetsAdd(data) {
    return request({
        url: '/assets/software',
        method: 'post',
        data
    }).then(res => {
        return res
    })
}

export function assetsRecycle(data) {
    return request({
        url: '/assets/software/recycle',
        method: 'get',
        params: data
    }).then(res => {
        console.log(res)
        return res
    })
}
export function hardwarePut(data) {
    return request({
        url: '/assets/hardware',
        method: 'put',
        data
    }).then(res => {
        return res
    })
}

export function hardwarePage(data) {
    return request({
        url: '/assets/hardware/page',
        method: 'post',
        data
    }).then(res => {
        return res
    })
}

export function hardwareAdd(data) {
    return request({
        url: '/assets/hardware',
        method: 'post',
        data
    }).then(res => {
        return res
    })
}

export function hardwareDel(data) {
    return request({
        url: '/assets/hardware',
        method: 'delete',
        data
    }).then(res => {
        console.log(res)
        return res
    })
}
